home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
os2
/
fst03f.zip
/
fst.doc
< prev
next >
Wrap
Text File
|
1996-08-13
|
37KB
|
1,207 lines
===============================================================================
fst.doc fst 0.3f 13-Aug-1996
===============================================================================
Copyright (c) 1995-1996 by Eberhard Mattes
License
=======
fst is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
fst is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with fst; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
What is fst?
============
fst (File System Tool) is a tool for checking filesystems, like
CHKDSK, and for displaying information about filesystems. Currently,
fst supports HPFS and FAT (FAT support is quite untested).
Unlike CHKDSK, fst does not fix the errors it finds.
I wrote fst after a HPFS partition was corrupted by an HPFS bug three
times in a single day. I wanted to know exactly what's going wrong.
Why another CHKDSK? Well, CHKDSK has several problems:
- CHKDSK does not show the names of all files known to be corrupt (or
corrupted by CHKDSK). For instance, if n files share data sectors,
the names of only n-1 files are printed; CHKDSK won't tell you about
one file which is probably damaged out of each group of files
sharing sectors
- CHKDSK sometimes corrupts the file system even more than it was
before running CHKDSK. fst can save a snapshot of all relevant
sectors to a file. After running CHKDSK, you can compare the disk
to the snapshot file to find out what sectors have been changed by
CHKDSK. You can even restore the sectors from the snapshot file to
the disk to undo CHKDSK's fixes.
- CHKDSK sometimes gives false alarms, complaining about errors
which don't exist and which it won't fix. For instance, CHKDSK
apparently has problems with extended attributes of type 2 (FNODE
pointing to an ALSEC).
- CHKDSK cannot fix certain types of HPFS corruption (for instance,
sectors shared by Spare DIRBLKs and extended attributes). To be
able to fix the errors manually with a sector editor, one needs to
know exactly what's wrong. For each defect, fst prints the relevant
sector numbers.
Sector editors for OS/2
=======================
fst is not a sector editor. There are several sector editors
available for OS/2:
- DiskEdit (part of the Graham Utilities)
- SEdit (part of the GammaTech Utilities)
- HPFSTool (Shareware, ftp-os2.cdrom:/pub/os2/diskutil/hpfstl17.zip)
Installing fst
==============
After unpacking fst03f.zip, copy FST.EXE and FST.DOC to a
write-protected floppy disk. If you have a FAT partition on a hard
disk, copy FST.EXE and FST.DOC to a FAT partition. Note that HPFS
partitions are not accessible if the system has not been shutdown
properly; as this is exactly the situation in which you might want to
run fst, having FST.EXE on an HPFS partition won't work.
If you are installing fst on a machine which can be accessed remotely,
make sure that fst cannot be run by remote users (telnet, BBS, etc.).
fst's `copy' action can read any file, even files which are protected
by access control or locked.
Running fst
===========
fst is a command line oriented program. The action to be performed
and the arguments for that action are specefied in the command line of
fst.
Command line overview
---------------------
The command line has the following format:
fst [<fst_options>] <action> [<action_options>] <arguments>
<fst_options> are optional switches which control the overall
operation of fst.
<action> is a keyword specifying the action to perform.
<action_options> are optional switches which depend on <action>.
<arguments> are parameters (such as filenames) for the action,
depending on <action>.
Getting help
------------
If you run fst without any arguments, it will display a short overview
over the available <fst_options> and <action>s:
fst
To get help on a specific action, type
fst -h <action>
where <action> is the action for which you want to get help. Example:
fst -h check
This will show the available <action_options> and <arguments> for the
`check' action.
fst options
-----------
The following optional switches can be specified for <fst_options>:
-h Show help about <action>.
-d Use DosRead/DosWrite. By default, fst uses logical disk track
I/O. You probably never have to use the -d switch.
-n Continue if disk cannot be locked. By default, fst aborts if
it cannot lock the specified disk. If the -n option is given
and the disk cannot be locked, fst continues after printing a
warning. As the operating system may change the disk at any
time unless it is locked, fst's operation on an unlocked disk
is very unreliable. For instance, the `check' action may
indicate errors which are not present, or may miss errors
which are present. Snapshot files created from an unlocked
disk may be inconsistent.
-w Enable writing to disk. By default, fst opens the disk for
reading only. Some actions (`write' and `restore') write to
the disk, therefore you have to use the -w option to enable
writing. Unless the -w option is given, fst is completely
safe.
-x Show sector numbers in hexadecimal. By default, sector
numbers are displayed in decimal. Some sector editors use
hexadecimal numbers for sector numbers; you might want to use
the -x option if you are using such a sector editor.
Actions
-------
Give exactly one of the following keywords for <action> on fst's
command line:
info Show information about the file system, a sector, or a path name
check Check the file system
save Take a snapshot of the file system
diff Compare snapshot files, CRC files, and disks
restore Copy sectors from snapshot file to disk
dir List a directory
copy Copy a file from the disk
read Copy a sector to a file
write Write a sector from a file to disk
crc Save CRCs for all sectors of a disk
Arguments
---------
All commands take arguments. At least one of these arguments (usually
called <source> or <target>) designates a disk to which the action
should be applied. A disk is specified by the drive letter followed
by a colon. Example:
fst check c:
Note that CDROM drives are not supported. Alternatively, most actions
support snapshot files in place of disks. Example:
fst check c951204a.ss
Snapshot files are recognized by a special signature (magic word) and
are created with the `save' action. A snapshot file contains all
relevant sectors which make up the structure of the file system. This
includes all directories and most extended attributes.
Alternatively, some actions support CRC files in place of disks.
Example:
fst diff d951203a.crc d:
CRC files are recognized by a special signature (magic word) and are
created with the `crc' action. A CRC file contains one CRC (a special
variant of a checksum) for each sector of its source disk.
Some actions take a sector number as argument. Sector numbers can be
given as decimal number (without leading 0), as hexadecimal number
(leading 0x) or as octal number (leading 0 -- attention!).
Output redirection
------------------
You can redirect fst's output to a file or a device or pipe the output
into another program such as `more'. Informational output (that is,
output expected to be generated by a given action) is sent to